package com.huan.dubbo.service.spi;

import com.huan.dubbo.service.OrderPay;
import com.huan.dubbo.service.TestService;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Activate;

/**
 * OrderPay 接口的扩展类
 */
@Activate(group = "online",value = "aliPay")
public class AliPayOrder implements OrderPay {
    private TestService testService;

    public void setTestService(TestService testService) {
        this.testService = testService;
    }

    @Override
    public String pay() {
        System.out.println("支付宝");
        return "支付宝";
    }

    @Override
    public String payAdaptive(URL url) {
        System.out.println("支付宝");
        return "支付宝";
    }
}
